﻿using App.Domain.Model;
using App.Service.WebAPI.Resources;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Web.Http;

namespace App.Service.WebAPI.Controllers
{
    public class PersonController : ControllerBase
    {
        //public PersonCollection GET()
        //{
        //    var personBoList = bal.GetPersons(QueryString["personType"], QueryString["emailPromotion"]);
        //    PersonCollection result = new PersonCollection();
        //    result.AddRange(personBoList.Select(bo => new PersonDTO(bo)));
            
        //    //personCollection.AddSelfLink(Request.RequestUri.AbsoluteUri);
        //    //if (personCollection.Items != null && personCollection.Items.Count() > 0)
        //    //{
        //    //    personCollection.AddFirstLink(RequestUri + "/" + personCollection.Items.FirstOrDefault().ID + "." + UriExtension);
        //    //    personCollection.AddLastLink(RequestUri + "/" + personCollection.Items.LastOrDefault().ID + "." + UriExtension);
        //    //}
        //    return result;
        //}
        //public PersonDTO GET(string secondLevel)
        //{
        //    int idint;
        //    if (Int32.TryParse(secondLevel, out idint))
        //    {
        //        return new PersonDTO(bal.GetPerson(idint));
        //    }
        //    else
        //    {
        //        throw new HttpResponseException(HttpStatusCode.BadRequest);
        //    }
        //}
    }
}
